package flexo.input.entity;

import flexo.input.Event;

public class ExitOnEsc extends Entity
{
	public ExitOnEsc()
	{
		is.addAction("exit", flexo.input.EventType.KEY_ESCAPE);
	}	

	@Override
	public void remove()
	{
		super.remove();
		is.removeAction("exit");
	}

	@Override
	protected void update(Event e, float value)
	{
		if (e.check("exit"))
		{
			flexo.Kernel.release();
		}
	}

}
